<?php
/**
* @author Bimal Poudel
* @package Smarty Framework
* @support http://www.odesk.com/users/~~dd91d11caed0cdce
* @contact http://www.sanjaal.com
* @company Sanjaal Corps
*/

require_once('inc.config.php');

# Fixed dimensions for all images
$width=400;
$height=200;

$original_images = glob('originals/*.jpg');

foreach($original_images as $oi => $original_image)
{
	$image = basename($original_image);
	
	$cropnail = new cropnail($width, $height);
	$cropnail->resize($original_image, "cropnails/single-{$image}", $crop_pattern);
}

# See reports
header('Location: examples/diretory-single.php');
?>